# -*- coding: UTF-8 -*- #
"""
-------真正的勇士， 敢于直面惨淡的Warning、 敢于正视淋漓的Error-----
@author : 贾鹏博
@file : main_page.py
@time : 2022/6/11 17:29
"""

from appium.webdriver.common.appiumby import AppiumBy
from apptest.XueQiu_PO.page.search_page import SearchPage
from apptest.XueQiu_PO.base.xueqiu_app import XueQiuApp


class Mainpage(XueQiuApp):
    _SEARCH_BOX_ELEMENT = (AppiumBy.ID, "com.xueqiu.android:id/tv_search")

    def click_search(self):
        # 点击搜索框 com.xueqiu.android:id/tv_search
        self.find_and_click(*self._SEARCH_BOX_ELEMENT)
        return SearchPage(self.driver)
